import React from 'react';
import { Layout } from 'antd';
import MenuSub from '../../components/MenuSub';
import RouterBeforeEach from '../../routers/RouterBeforeEach';
import Top from '../../components/Top';

const { Header, Footer, Sider, Content } = Layout;
export default function Home() {
  let [collapsed,setCollapsed]=React.useState(false)
  let props = {setCollapsed:()=>{setCollapsed(!collapsed)}}
  return (
    <div>
      <Layout style={{height:'100vh'}}>
        <Header style={{height:'50px',lineHeight:'50px',position: 'fixed',width:'100%',zIndex:'2',background:'#304156'}}><Top></Top></Header>
        <Layout style={{paddingTop:'50px'}}>
          <Sider collapsed={collapsed} style={{background:'#ffffff',height:'100%'}}>
            <MenuSub {...props}></MenuSub>
          </Sider>
          <Layout style={{overflowY:'auto'}}>
            <Content>
              <div style={{minHeight:'92%'}}>
                <RouterBeforeEach/>
              </div>
              <Footer style={{backgroundColor:'',height:'6vh',padding:'0',textAlign:'center',lineHeight:'6vh',fontSize:'16px'}}>&copy;版权所有 nankezs.cn 2022-4</Footer>
            </Content>
          </Layout>
        </Layout>
      </Layout>
    </div>
  )
};
